const express = require('./express');


const app = express();

// 第一个参数是匹配路径 不传相当于"/"
app.use(function (req,res,next) {
    req.a = 1;
    next()
})

app.use('/',function (req,res,next){
    req.a++;
    next();
})
app.use('/a',function (req,res,next){
    req.a++;
    next();
})
app.get('/a',function (req,res,next){
    res.end(req.a + '');
})
app.get('/',function (req,res,next){
    res.end(req.a + '');
})

app.listen(3000)

